
#include <stdio.h>
#include <assert.h>

struct point_s {
	int		x, y; 
}; 

#define N			21
#define INIT		-1
#define HORSE		-2


long long map[N][N]; 
struct point_s b; 

void dump_map(int px, int py)
{
	int	x, y;

	printf("p: (%d, %d)\n", px, py); 
	printf("    "); 
	for (x=0; x<=b.x; x++) {
		printf(" %5d   ", x); 
	}
	
	for (y=0; y<=b.y; y++) {
		printf("\n%2d: ", y); 
		for (x=0; x<=b.x; x++) {
			if(map[x][y]==INIT) {
				printf("_______  "); 
			} else if(map[x][y]==HORSE) {
				printf("(  H  )  "); 
			} else {
				printf("(%5lld)  ", map[x][y]);
			}
		}
	} 
	printf("\n -- press any key to continue --\n"); 
	//getchar(); 
}

int over_boundary(int x, int y)
{
	if (x<0 || x>b.x) {
		return 1;  
	}
	if (y<0 || y>b.y) {
		return 1;  
	}
	return 0; 
}

void init_map(void)
{
	int	x, y; 
	for (x=0; x<=b.x; x++) 
		for (y=0; y<=b.y; y++) 
			map[x][y] = INIT; 
}

void mark_horse_point(struct point_s *h)
{
	static struct point_s *p, np[8] = {
		{-1, 2}, {1, 2}, 
		{2, 1}, {2, -1}, 
		{1, -2}, {-1, -2}, 
		{-2, -1}, {-2, 1}, 
	}; 

	int	i, x, y; 
	for (i=0; i<8; i++) {
		p = &np[i];
		x = h->x + p->x; 
		y = h->y + p->y;  
		if (over_boundary(x, y)) 
			continue; 
		map[x][y] = HORSE; 
	}

	map[h->x][h->y] = HORSE; 
}


long long soldier_go(int x, int y) 
{
	int	rx, ry, dx, dy; 
	long long nr=0, nd=0; 

	//dump_map(x, y); 

	if (map[x][y]!=INIT) {
		assert(map[x][y]>=0); 
		return map[x][y]; 
	}

	if (x==b.x && y==b.y) {
		return 1; 
	}

	rx = x+1; 
	ry = y; 
	dx = x; 
	dy = y+1; 

	if (!over_boundary(rx, ry) && map[rx][ry]!=HORSE) {
		//printf("go (%d, %d) ==> (%d, %d)\n", x, y, rx, ry); 
		nr = soldier_go(rx, ry); 
		//printf("ret (%d, %d) ==> (%d, %d), res=%lld\n", x, y, rx, ry, nr); 
	}
	if (!over_boundary(dx, dy) && map[dx][dy]!=HORSE) {
		//rintf("go (%d, %d) ==> (%d, %d)\n", x, y, dx, dy); 
		nd = soldier_go(dx, dy); 
		//printf("ret (%d, %d) ==> (%d, %d), res=%lld\n", x, y, dx, dy, nd); 
	}
	map[x][y] = nr+nd; 

	//dump_map(x, y); 
	
	return map[x][y]; 
}

int main()
{
	struct point_s h; 
	long long	n; 

	scanf("%d %d %d %d", &b.x, &b.y, &h.x, &h.y); 
	//printf("%d %d %d %d\n", b.x, b.y, h.x, h.y);
	init_map(); 
	mark_horse_point(&h); 
	n = soldier_go(0, 0); 
	printf("%lld", n); 

	return 0; 
}


